package co.edu.usbcali.sam.presentation.businessDelegate;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import co.edu.usbcali.sam.modelo.Asignaturas;
import co.edu.usbcali.sam.modelo.Aula;
import co.edu.usbcali.sam.modelo.AulaAsig;
import co.edu.usbcali.sam.modelo.Calificaciones;
import co.edu.usbcali.sam.modelo.Departamentos;
import co.edu.usbcali.sam.modelo.Estudiantes;
import co.edu.usbcali.sam.modelo.MatriculaAcademica;
import co.edu.usbcali.sam.modelo.MatriculaAsignatura;
import co.edu.usbcali.sam.modelo.Persona;
import co.edu.usbcali.sam.modelo.ProfesorAsignatura;
import co.edu.usbcali.sam.modelo.Profesores;
import co.edu.usbcali.sam.modelo.Rol;
import co.edu.usbcali.sam.modelo.TipoIdentificacion;
import co.edu.usbcali.sam.modelo.Usuario;
import co.edu.usbcali.sam.modelo.control.IAsignaturasLogic;
import co.edu.usbcali.sam.modelo.control.IAulaAsigLogic;
import co.edu.usbcali.sam.modelo.control.IAulaLogic;
import co.edu.usbcali.sam.modelo.control.ICalificacionesLogic;
import co.edu.usbcali.sam.modelo.control.IDepartamentosLogic;
import co.edu.usbcali.sam.modelo.control.IEstudiantesLogic;
import co.edu.usbcali.sam.modelo.control.IMatriculaAcademicaLogic;
import co.edu.usbcali.sam.modelo.control.IMatriculaAsignaturaLogic;
import co.edu.usbcali.sam.modelo.control.IPersonaLogic;
import co.edu.usbcali.sam.modelo.control.IProfesorAsignaturaLogic;
import co.edu.usbcali.sam.modelo.control.IProfesoresLogic;
import co.edu.usbcali.sam.modelo.control.IRolLogic;
import co.edu.usbcali.sam.modelo.control.ITipoIdentificacionLogic;
import co.edu.usbcali.sam.modelo.control.IUsuarioLogic;
import co.edu.usbcali.sam.modelo.dto.AsignaturasDTO;
import co.edu.usbcali.sam.modelo.dto.AulaAsigDTO;
import co.edu.usbcali.sam.modelo.dto.AulaDTO;
import co.edu.usbcali.sam.modelo.dto.CalificacionesDTO;
import co.edu.usbcali.sam.modelo.dto.DepartamentosDTO;
import co.edu.usbcali.sam.modelo.dto.EstudiantesDTO;
import co.edu.usbcali.sam.modelo.dto.MatriculaAcademicaDTO;
import co.edu.usbcali.sam.modelo.dto.MatriculaAsignaturaDTO;
import co.edu.usbcali.sam.modelo.dto.PersonaDTO;
import co.edu.usbcali.sam.modelo.dto.ProfesorAsignaturaDTO;
import co.edu.usbcali.sam.modelo.dto.ProfesoresDTO;
import co.edu.usbcali.sam.modelo.dto.RolDTO;
import co.edu.usbcali.sam.modelo.dto.TipoIdentificacionDTO;
import co.edu.usbcali.sam.modelo.dto.UsuarioDTO;


/**
* Use a Business Delegate to reduce coupling between presentation-tier clients and business services.
* The Business Delegate hides the underlying implementation details of the business service, such as lookup and access details of the EJB architecture.
*
* The Business Delegate acts as a client-side business abstraction; it provides an abstraction for, and thus hides,
* the implementation of the business services. Using a Business Delegate reduces the coupling between presentation-tier clients and
* the system's business services. Depending on the implementation strategy, the Business Delegate may shield clients from possible
* volatility in the implementation of the business service API. Potentially, this reduces the number of changes that must be made to the
* presentation-tier client code when the business service API or its underlying implementation changes.
*
* However, interface methods in the Business Delegate may still require modification if the underlying business service API changes.
* Admittedly, though, it is more likely that changes will be made to the business service rather than to the Business Delegate.
*
* Often, developers are skeptical when a design goal such as abstracting the business layer causes additional upfront work in return
* for future gains. However, using this pattern or its strategies results in only a small amount of additional upfront work and provides
* considerable benefits. The main benefit is hiding the details of the underlying service. For example, the client can become transparent
* to naming and lookup services. The Business Delegate also handles the exceptions from the business services, such as java.rmi.Remote
* exceptions, Java Messages Service (JMS) exceptions and so on. The Business Delegate may intercept such service level exceptions and
* generate application level exceptions instead. Application level exceptions are easier to handle by the clients, and may be user friendly.
* The Business Delegate may also transparently perform any retry or recovery operations necessary in the event of a service failure without
* exposing the client to the problem until it is determined that the problem is not resolvable. These gains present a compelling reason to
* use the pattern.
*
* Another benefit is that the delegate may cache results and references to remote business services. Caching can significantly improve performance,
* because it limits unnecessary and potentially costly round trips over the network.
*
* A Business Delegate uses a component called the Lookup Service. The Lookup Service is responsible for hiding the underlying implementation
* details of the business service lookup code. The Lookup Service may be written as part of the Delegate, but we recommend that it be
* implemented as a separate component, as outlined in the Service Locator pattern (See "Service Locator" on page 368.)
*
* When the Business Delegate is used with a Session Facade, typically there is a one-to-one relationship between the two.
* This one-to-one relationship exists because logic that might have been encapsulated in a Business Delegate relating to its interaction
* with multiple business services (creating a one-to-many relationship) will often be factored back into a Session Facade.
*
* Finally, it should be noted that this pattern could be used to reduce coupling between other tiers, not simply the presentation and the
* business tiers.
*
* @author Zathura Code Generator http://code.google.com/p/zathura
* www.zathuracode.org
*
*/
@Scope("singleton")
@Service("BusinessDelegatorView")
public class BusinessDelegatorView implements IBusinessDelegatorView {
    @Autowired
    private IAsignaturasLogic asignaturasLogic;
    @Autowired
    private IAulaLogic aulaLogic;
    @Autowired
    private IAulaAsigLogic aulaAsigLogic;
    @Autowired
    private ICalificacionesLogic calificacionesLogic;
    @Autowired
    private IDepartamentosLogic departamentosLogic;
    @Autowired
    private IEstudiantesLogic estudiantesLogic;
    @Autowired
    private IMatriculaAcademicaLogic matriculaAcademicaLogic;
    @Autowired
    private IMatriculaAsignaturaLogic matriculaAsignaturaLogic;
    @Autowired
    private IPersonaLogic personaLogic;
    @Autowired
    private IProfesorAsignaturaLogic profesorAsignaturaLogic;
    @Autowired
    private IProfesoresLogic profesoresLogic;
    @Autowired
    private IRolLogic rolLogic;
    @Autowired
    private ITipoIdentificacionLogic tipoIdentificacionLogic;
    @Autowired
    private IUsuarioLogic usuarioLogic;

    public List<Asignaturas> getAsignaturas() throws Exception {
        return asignaturasLogic.getAsignaturas();
    }

    public void saveAsignaturas(Asignaturas entity) throws Exception {
        asignaturasLogic.saveAsignaturas(entity);
    }

    public void deleteAsignaturas(Asignaturas entity) throws Exception {
        asignaturasLogic.deleteAsignaturas(entity);
    }

    public void updateAsignaturas(Asignaturas entity) throws Exception {
        asignaturasLogic.updateAsignaturas(entity);
    }

    public Asignaturas getAsignaturas(Long idAsignatura)
        throws Exception {
        Asignaturas asignaturas = null;

        try {
            asignaturas = asignaturasLogic.getAsignaturas(idAsignatura);
        } catch (Exception e) {
            throw e;
        }

        return asignaturas;
    }

    public List<Asignaturas> findByCriteriaInAsignaturas(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return asignaturasLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Asignaturas> findPageAsignaturas(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return asignaturasLogic.findPageAsignaturas(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberAsignaturas() throws Exception {
        return asignaturasLogic.findTotalNumberAsignaturas();
    }

    public List<AsignaturasDTO> getDataAsignaturas() throws Exception {
        return asignaturasLogic.getDataAsignaturas();
    }
    
    public List<AsignaturasDTO> getDataAsignaturasByProfesor(Long idProfesor) throws Exception{
    	return asignaturasLogic.getDataAsignaturasByProfesor(idProfesor);
    }

    public List<Aula> getAula() throws Exception {
        return aulaLogic.getAula();
    }

    public void saveAula(Aula entity) throws Exception {
        aulaLogic.saveAula(entity);
    }

    public void deleteAula(Aula entity) throws Exception {
        aulaLogic.deleteAula(entity);
    }

    public void updateAula(Aula entity) throws Exception {
        aulaLogic.updateAula(entity);
    }

    public Aula getAula(Long idAula) throws Exception {
        Aula aula = null;

        try {
            aula = aulaLogic.getAula(idAula);
        } catch (Exception e) {
            throw e;
        }

        return aula;
    }

    public List<Aula> findByCriteriaInAula(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return aulaLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Aula> findPageAula(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return aulaLogic.findPageAula(sortColumnName, sortAscending, startRow,
            maxResults);
    }

    public Long findTotalNumberAula() throws Exception {
        return aulaLogic.findTotalNumberAula();
    }

    public List<AulaDTO> getDataAula() throws Exception {
        return aulaLogic.getDataAula();
    }

    public List<AulaAsig> getAulaAsig() throws Exception {
        return aulaAsigLogic.getAulaAsig();
    }

    public void saveAulaAsig(AulaAsig entity) throws Exception {
        aulaAsigLogic.saveAulaAsig(entity);
    }

    public void deleteAulaAsig(AulaAsig entity) throws Exception {
        aulaAsigLogic.deleteAulaAsig(entity);
    }

    public void updateAulaAsig(AulaAsig entity) throws Exception {
        aulaAsigLogic.updateAulaAsig(entity);
    }

    public AulaAsig getAulaAsig(Long idAulaAsig) throws Exception {
        AulaAsig aulaAsig = null;

        try {
            aulaAsig = aulaAsigLogic.getAulaAsig(idAulaAsig);
        } catch (Exception e) {
            throw e;
        }

        return aulaAsig;
    }

    public List<AulaAsig> findByCriteriaInAulaAsig(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return aulaAsigLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<AulaAsig> findPageAulaAsig(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return aulaAsigLogic.findPageAulaAsig(sortColumnName, sortAscending,
            startRow, maxResults);
    }

    public Long findTotalNumberAulaAsig() throws Exception {
        return aulaAsigLogic.findTotalNumberAulaAsig();
    }

    public List<AulaAsigDTO> getDataAulaAsig() throws Exception {
        return aulaAsigLogic.getDataAulaAsig();
    }

    public List<Calificaciones> getCalificaciones() throws Exception {
        return calificacionesLogic.getCalificaciones();
    }

    public void saveCalificaciones(Calificaciones entity)
        throws Exception {
        calificacionesLogic.saveCalificaciones(entity);
    }

    public void deleteCalificaciones(Calificaciones entity)
        throws Exception {
        calificacionesLogic.deleteCalificaciones(entity);
    }

    public void updateCalificaciones(Calificaciones entity)
        throws Exception {
        calificacionesLogic.updateCalificaciones(entity);
    }

    public Calificaciones getCalificaciones(Long idCali)
        throws Exception {
        Calificaciones calificaciones = null;

        try {
            calificaciones = calificacionesLogic.getCalificaciones(idCali);
        } catch (Exception e) {
            throw e;
        }

        return calificaciones;
    }

    public List<Calificaciones> findByCriteriaInCalificaciones(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return calificacionesLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Calificaciones> findPageCalificaciones(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return calificacionesLogic.findPageCalificaciones(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberCalificaciones() throws Exception {
        return calificacionesLogic.findTotalNumberCalificaciones();
    }

    public List<CalificacionesDTO> getDataCalificaciones()
        throws Exception {
        return calificacionesLogic.getDataCalificaciones();
    }

    public List<Departamentos> getDepartamentos() throws Exception {
        return departamentosLogic.getDepartamentos();
    }

    public void saveDepartamentos(Departamentos entity)
        throws Exception {
        departamentosLogic.saveDepartamentos(entity);
    }

    public void deleteDepartamentos(Departamentos entity)
        throws Exception {
        departamentosLogic.deleteDepartamentos(entity);
    }

    public void updateDepartamentos(Departamentos entity)
        throws Exception {
        departamentosLogic.updateDepartamentos(entity);
    }

    public Departamentos getDepartamentos(Long idDepartamento)
        throws Exception {
        Departamentos departamentos = null;

        try {
            departamentos = departamentosLogic.getDepartamentos(idDepartamento);
        } catch (Exception e) {
            throw e;
        }

        return departamentos;
    }

    public List<Departamentos> findByCriteriaInDepartamentos(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return departamentosLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Departamentos> findPageDepartamentos(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return departamentosLogic.findPageDepartamentos(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberDepartamentos() throws Exception {
        return departamentosLogic.findTotalNumberDepartamentos();
    }

    public List<DepartamentosDTO> getDataDepartamentos()
        throws Exception {
        return departamentosLogic.getDataDepartamentos();
    }

    public List<Estudiantes> getEstudiantes() throws Exception {
        return estudiantesLogic.getEstudiantes();
    }

    public void saveEstudiantes(Estudiantes entity) throws Exception {
        estudiantesLogic.saveEstudiantes(entity);
    }

    public void deleteEstudiantes(Estudiantes entity) throws Exception {
        estudiantesLogic.deleteEstudiantes(entity);
    }

    public void updateEstudiantes(Estudiantes entity) throws Exception {
        estudiantesLogic.updateEstudiantes(entity);
    }

    public Estudiantes getEstudiantes(Long idEstudiante)
        throws Exception {
        Estudiantes estudiantes = null;

        try {
            estudiantes = estudiantesLogic.getEstudiantes(idEstudiante);
        } catch (Exception e) {
            throw e;
        }

        return estudiantes;
    }

    public List<Estudiantes> findByCriteriaInEstudiantes(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return estudiantesLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Estudiantes> findPageEstudiantes(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return estudiantesLogic.findPageEstudiantes(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberEstudiantes() throws Exception {
        return estudiantesLogic.findTotalNumberEstudiantes();
    }

    public List<EstudiantesDTO> getDataEstudiantes() throws Exception {
        return estudiantesLogic.getDataEstudiantes();
    }

    public List<MatriculaAcademica> getMatriculaAcademica()
        throws Exception {
        return matriculaAcademicaLogic.getMatriculaAcademica();
    }

    public void saveMatriculaAcademica(MatriculaAcademica entity)
        throws Exception {
        matriculaAcademicaLogic.saveMatriculaAcademica(entity);
    }

    public void deleteMatriculaAcademica(MatriculaAcademica entity)
        throws Exception {
        matriculaAcademicaLogic.deleteMatriculaAcademica(entity);
    }

    public void updateMatriculaAcademica(MatriculaAcademica entity)
        throws Exception {
        matriculaAcademicaLogic.updateMatriculaAcademica(entity);
    }

    public MatriculaAcademica getMatriculaAcademica(Long idMatAca)
        throws Exception {
        MatriculaAcademica matriculaAcademica = null;

        try {
            matriculaAcademica = matriculaAcademicaLogic.getMatriculaAcademica(idMatAca);
        } catch (Exception e) {
            throw e;
        }

        return matriculaAcademica;
    }

    public List<MatriculaAcademica> findByCriteriaInMatriculaAcademica(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return matriculaAcademicaLogic.findByCriteria(variables,
            variablesBetween, variablesBetweenDates);
    }

    public List<MatriculaAcademica> findPageMatriculaAcademica(
        String sortColumnName, boolean sortAscending, int startRow,
        int maxResults) throws Exception {
        return matriculaAcademicaLogic.findPageMatriculaAcademica(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberMatriculaAcademica() throws Exception {
        return matriculaAcademicaLogic.findTotalNumberMatriculaAcademica();
    }

    public List<MatriculaAcademicaDTO> getDataMatriculaAcademica()
        throws Exception {
        return matriculaAcademicaLogic.getDataMatriculaAcademica();
    }

    public List<MatriculaAsignatura> getMatriculaAsignatura()
        throws Exception {
        return matriculaAsignaturaLogic.getMatriculaAsignatura();
    }

    public void saveMatriculaAsignatura(MatriculaAsignatura entity)
        throws Exception {
        matriculaAsignaturaLogic.saveMatriculaAsignatura(entity);
    }

    public void deleteMatriculaAsignatura(MatriculaAsignatura entity)
        throws Exception {
        matriculaAsignaturaLogic.deleteMatriculaAsignatura(entity);
    }

    public void updateMatriculaAsignatura(MatriculaAsignatura entity)
        throws Exception {
        matriculaAsignaturaLogic.updateMatriculaAsignatura(entity);
    }

    public MatriculaAsignatura getMatriculaAsignatura(Long idMatAsig)
        throws Exception {
        MatriculaAsignatura matriculaAsignatura = null;

        try {
            matriculaAsignatura = matriculaAsignaturaLogic.getMatriculaAsignatura(idMatAsig);
        } catch (Exception e) {
            throw e;
        }

        return matriculaAsignatura;
    }

    public List<MatriculaAsignatura> findByCriteriaInMatriculaAsignatura(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return matriculaAsignaturaLogic.findByCriteria(variables,
            variablesBetween, variablesBetweenDates);
    }

    public List<MatriculaAsignatura> findPageMatriculaAsignatura(
        String sortColumnName, boolean sortAscending, int startRow,
        int maxResults) throws Exception {
        return matriculaAsignaturaLogic.findPageMatriculaAsignatura(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberMatriculaAsignatura() throws Exception {
        return matriculaAsignaturaLogic.findTotalNumberMatriculaAsignatura();
    }

    public List<MatriculaAsignaturaDTO> getDataMatriculaAsignatura()
        throws Exception {
        return matriculaAsignaturaLogic.getDataMatriculaAsignatura();
    }

    public List<Persona> getPersona() throws Exception {
        return personaLogic.getPersona();
    }

    public void savePersona(Persona entity) throws Exception {
        personaLogic.savePersona(entity);
    }

    public void deletePersona(Persona entity) throws Exception {
        personaLogic.deletePersona(entity);
    }

    public void updatePersona(Persona entity) throws Exception {
        personaLogic.updatePersona(entity);
    }

    public Persona getPersona(Long idPersona) throws Exception {
        Persona persona = null;

        try {
            persona = personaLogic.getPersona(idPersona);
        } catch (Exception e) {
            throw e;
        }

        return persona;
    }

    public List<Persona> findByCriteriaInPersona(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return personaLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Persona> findPagePersona(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return personaLogic.findPagePersona(sortColumnName, sortAscending,
            startRow, maxResults);
    }

    public Long findTotalNumberPersona() throws Exception {
        return personaLogic.findTotalNumberPersona();
    }

    public List<PersonaDTO> getDataPersona() throws Exception {
        return personaLogic.getDataPersona();
    }

    public List<ProfesorAsignatura> getProfesorAsignatura()
        throws Exception {
        return profesorAsignaturaLogic.getProfesorAsignatura();
    }

    public void saveProfesorAsignatura(ProfesorAsignatura entity)
        throws Exception {
        profesorAsignaturaLogic.saveProfesorAsignatura(entity);
    }

    public void deleteProfesorAsignatura(ProfesorAsignatura entity)
        throws Exception {
        profesorAsignaturaLogic.deleteProfesorAsignatura(entity);
    }

    public void updateProfesorAsignatura(ProfesorAsignatura entity)
        throws Exception {
        profesorAsignaturaLogic.updateProfesorAsignatura(entity);
    }

    public ProfesorAsignatura getProfesorAsignatura(Long idProfeAsig)
        throws Exception {
        ProfesorAsignatura profesorAsignatura = null;

        try {
            profesorAsignatura = profesorAsignaturaLogic.getProfesorAsignatura(idProfeAsig);
        } catch (Exception e) {
            throw e;
        }

        return profesorAsignatura;
    }

    public List<ProfesorAsignatura> findByCriteriaInProfesorAsignatura(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return profesorAsignaturaLogic.findByCriteria(variables,
            variablesBetween, variablesBetweenDates);
    }

    public List<ProfesorAsignatura> findPageProfesorAsignatura(
        String sortColumnName, boolean sortAscending, int startRow,
        int maxResults) throws Exception {
        return profesorAsignaturaLogic.findPageProfesorAsignatura(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberProfesorAsignatura() throws Exception {
        return profesorAsignaturaLogic.findTotalNumberProfesorAsignatura();
    }

    public List<ProfesorAsignaturaDTO> getDataProfesorAsignatura()
        throws Exception {
        return profesorAsignaturaLogic.getDataProfesorAsignatura();
    }

    public List<Profesores> getProfesores() throws Exception {
        return profesoresLogic.getProfesores();
    }

    public void saveProfesores(Profesores entity) throws Exception {
        profesoresLogic.saveProfesores(entity);
    }

    public void deleteProfesores(Profesores entity) throws Exception {
        profesoresLogic.deleteProfesores(entity);
    }

    public void updateProfesores(Profesores entity) throws Exception {
        profesoresLogic.updateProfesores(entity);
    }

    public Profesores getProfesores(Long idProfesor) throws Exception {
        Profesores profesores = null;

        try {
            profesores = profesoresLogic.getProfesores(idProfesor);
        } catch (Exception e) {
            throw e;
        }

        return profesores;
    }

    public List<Profesores> findByCriteriaInProfesores(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return profesoresLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Profesores> findPageProfesores(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return profesoresLogic.findPageProfesores(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberProfesores() throws Exception {
        return profesoresLogic.findTotalNumberProfesores();
    }

    public List<ProfesoresDTO> getDataProfesores() throws Exception {
        return profesoresLogic.getDataProfesores();
    }

    public List<Rol> getRol() throws Exception {
        return rolLogic.getRol();
    }

    public void saveRol(Rol entity) throws Exception {
        rolLogic.saveRol(entity);
    }

    public void deleteRol(Rol entity) throws Exception {
        rolLogic.deleteRol(entity);
    }

    public void updateRol(Rol entity) throws Exception {
        rolLogic.updateRol(entity);
    }

    public Rol getRol(Long idRol) throws Exception {
        Rol rol = null;

        try {
            rol = rolLogic.getRol(idRol);
        } catch (Exception e) {
            throw e;
        }

        return rol;
    }

    public List<Rol> findByCriteriaInRol(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return rolLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Rol> findPageRol(String sortColumnName, boolean sortAscending,
        int startRow, int maxResults) throws Exception {
        return rolLogic.findPageRol(sortColumnName, sortAscending, startRow,
            maxResults);
    }

    public Long findTotalNumberRol() throws Exception {
        return rolLogic.findTotalNumberRol();
    }

    public List<RolDTO> getDataRol() throws Exception {
        return rolLogic.getDataRol();
    }

    public List<TipoIdentificacion> getTipoIdentificacion()
        throws Exception {
        return tipoIdentificacionLogic.getTipoIdentificacion();
    }

    public void saveTipoIdentificacion(TipoIdentificacion entity)
        throws Exception {
        tipoIdentificacionLogic.saveTipoIdentificacion(entity);
    }

    public void deleteTipoIdentificacion(TipoIdentificacion entity)
        throws Exception {
        tipoIdentificacionLogic.deleteTipoIdentificacion(entity);
    }

    public void updateTipoIdentificacion(TipoIdentificacion entity)
        throws Exception {
        tipoIdentificacionLogic.updateTipoIdentificacion(entity);
    }

    public TipoIdentificacion getTipoIdentificacion(Long idIdentificacion)
        throws Exception {
        TipoIdentificacion tipoIdentificacion = null;

        try {
            tipoIdentificacion = tipoIdentificacionLogic.getTipoIdentificacion(idIdentificacion);
        } catch (Exception e) {
            throw e;
        }

        return tipoIdentificacion;
    }

    public List<TipoIdentificacion> findByCriteriaInTipoIdentificacion(
        Object[] variables, Object[] variablesBetween,
        Object[] variablesBetweenDates) throws Exception {
        return tipoIdentificacionLogic.findByCriteria(variables,
            variablesBetween, variablesBetweenDates);
    }

    public List<TipoIdentificacion> findPageTipoIdentificacion(
        String sortColumnName, boolean sortAscending, int startRow,
        int maxResults) throws Exception {
        return tipoIdentificacionLogic.findPageTipoIdentificacion(sortColumnName,
            sortAscending, startRow, maxResults);
    }

    public Long findTotalNumberTipoIdentificacion() throws Exception {
        return tipoIdentificacionLogic.findTotalNumberTipoIdentificacion();
    }

    public List<TipoIdentificacionDTO> getDataTipoIdentificacion()
        throws Exception {
        return tipoIdentificacionLogic.getDataTipoIdentificacion();
    }

    public List<Usuario> getUsuario() throws Exception {
        return usuarioLogic.getUsuario();
    }

    public void saveUsuario(Usuario entity) throws Exception {
        usuarioLogic.saveUsuario(entity);
    }

    public void deleteUsuario(Usuario entity) throws Exception {
        usuarioLogic.deleteUsuario(entity);
    }

    public void updateUsuario(Usuario entity) throws Exception {
        usuarioLogic.updateUsuario(entity);
    }

    public Usuario getUsuario(Long idUsuario) throws Exception {
        Usuario usuario = null;

        try {
            usuario = usuarioLogic.getUsuario(idUsuario);
        } catch (Exception e) {
            throw e;
        }

        return usuario;
    }

    public List<Usuario> findByCriteriaInUsuario(Object[] variables,
        Object[] variablesBetween, Object[] variablesBetweenDates)
        throws Exception {
        return usuarioLogic.findByCriteria(variables, variablesBetween,
            variablesBetweenDates);
    }

    public List<Usuario> findPageUsuario(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults)
        throws Exception {
        return usuarioLogic.findPageUsuario(sortColumnName, sortAscending,
            startRow, maxResults);
    }

    public Long findTotalNumberUsuario() throws Exception {
        return usuarioLogic.findTotalNumberUsuario();
    }

    public List<UsuarioDTO> getDataUsuario() throws Exception {
        return usuarioLogic.getDataUsuario();
    }
    
    @Override
	public List<UsuarioDTO> consultarUsuariosNombreRol() throws Exception {
		return usuarioLogic.consultarUsuariosNombreRol();
	}

	@Override
	public Long consultarIdEstudiantexLogin(String login) throws Exception {
		return usuarioLogic.consultarIdEstudiantexLogin(login);
	}

	@Override
	public List<ProfesoresDTO> consultarProfesores() throws Exception {
		return profesoresLogic.consultarProfesores();
	}
    
}
